import request from '@/utils/request.js'

// 注册用户
export const userRegisterService = (data) => {
  return request.post('/api/reg', data)
}
// 用户登录
export const userLoginService = (data) => {
  return request({
    method: 'POST',
    url: '/api/login',
    data
  })
}
// 获取用户信息
export const getUserInfoService = () => {
  return request({
    method: 'GET',
    url: '/my/userinfo'
  })
}

export const getMenusService = () => {
  return request({
    method: 'GET',
    url: '/my/menus'
  })
}
